﻿CREATE PROCEDURE [acms].[UserPostComment_Delete]
	@Id int, 
	@ConcurencyId rowversion
AS

	if exists(select null from UserPostComment where Id = @Id and ConcurencyId = @ConcurencyId and Deleted = 0) begin
		update UserPostComment set Deleted = 1 where Id = @Id and ConcurencyId = @ConcurencyId and Deleted = 0
	end
	else if exists(select null from UserPostComment where Id = @Id and Deleted = 0) begin
		return -100
	end
	else begin
		return -200
	end
RETURN 0;